import axios from 'axios'
import urlConfig from '@/http/env'

const { baseURL }=urlConfig.prod

const service = axios.create({
    baseURL
})

//请求拦截器
service.interceptors.request.use((config) => {
    
    console.log(config)

   // config.headers['zywxtoken']=

    return config


}, (error) => {
    return Promise.reject(error)
})


//响应式拦截器
service.interceptors.response.use(res => { 

    //对返回的成功或失败状态码进行处理

    return res;
}, error => {
    return Promise.reject(error)
})


export default service